<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org/">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table border="1" class="table">
    <tr>
        <th>No.</th>
        <th>uid</th>
        <th>姓名</th>
        <th>密码</th>
        <th>类别</th>
        <th>创建时间</th>
        <th>所属数据库</th>
        <th>性别</th>
        <th>操作</th>
    </tr>
    <tr th:each="user, statu : ${user}">
        <td th:text="${statu.count}"></td>
        <td th:text="${user.uid}"></td>
        <td th:text="${user.username}"></td>
        <td th:text="${user.userpwd}"></td>
        <td th:text="${user.usertype}"></td>
        <td th:text="${user.dbName}"></td>
        <td>
            <span th:if="${user.usersex} == 男">男</span>
            <span th:if="${user.usersex} == 女">女</span>
        </td>
        <td th:text="${user.usertime ne null ? #dates.format(user.usertime, 'yyyy‐MM‐dd') :'保密'}"></td>
        <td>
            <span><a th:href="@{/user/toupdate/{id}(id=${user.uid})}">修改</a></span>
            <span><a th:href="@{/user/delete/{id}(id=${user.uid})}">删除</a></span>
        </td>
    </tr>
</table>
</body>
</html>